<template>
  <div class="content-box">
    <div class="scroll-view-box">
      <el-button class="history-btn" @click="hisDrawer = true" size="small">历史记录</el-button>
      <div class="data-box-left" ref="databoxleft" v-if="dataObj">
        <div class="user-title-box" v-if="$fieldShowFunc('41-xmxx')">项目信息</div>
        <el-descriptions class="margin-bottom" :column="3" border>
          <el-descriptions-item label="项目名称" v-if="$fieldShowFunc('ys_xmmc')">
            <div class="justify_6" slot="label">项目名称</div>
            {{ dataObj.project_name || '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="项目编号" v-if="$fieldShowFunc('ys_xmbh')">
            <div class="justify_6" slot="label">项目编号</div>
            <el-button @click="goToProjectFunc" type="text" style="padding: 0;">{{ dataObj.project_number || '--'
            }}</el-button>
          </el-descriptions-item>
          <el-descriptions-item label="项目品牌" v-if="$fieldShowFunc('ys_xmpp')">
            <div class="justify_6" slot="label">项目品牌</div>
            {{ dataObj.brand_name || '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="项目类型" v-if="$fieldShowFunc('ys_xmlx')">
            <div class="justify_6" slot="label">项目类型</div>
            {{ dataObj.store_type_name || '--' }}
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptions_opacity" contentClassName="descriptions_opacity"
            v-for="key in $fieldRowFunc(3, 0, 0)" :key="key"></el-descriptions-item>
        </el-descriptions>
        <div class="user-title-box" v-if="$fieldShowFunc('41-bjxx')">报价信息</div>
        <el-descriptions class="margin-bottom" :column="3" border>
          <el-descriptions-item label="报价编号" v-if="$fieldShowFunc('ys_bjbh')">
            <div class="justify_6" slot="label">报价编号</div>
            {{ dataObj.quotation.quotation_number || '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="造价员" v-if="$fieldShowFunc('ys_zjy')">
            <div class="justify_6" slot="label">造价员</div>
            {{ dataObj.cost_estimator_name }}
          </el-descriptions-item>
          <el-descriptions-item label="报价单状态" v-if="$fieldShowFunc('ys_bjdzt')">
            <div class="justify_6" slot="label">报价单状态</div>
            <span v-if="dataObj.quotation_status == 10">待报价</span>
            <span v-if="dataObj.quotation_status == 20">待工程经理审核</span>
            <span v-if="dataObj.quotation_status == 25">工程经理审核拒绝</span>
            <span v-if="dataObj.quotation_status == 30">待造价主管审核</span>
            <span v-if="dataObj.quotation_status == 35">造价主管审核拒绝</span>
            <span v-if="dataObj.quotation_status == 40">待签约</span>
            <span v-if="dataObj.quotation_status == 45">客户经理退回报价单</span>
            <span v-if="dataObj.quotation_status == 50">已签约</span>
            <span v-if="dataObj.quotation_status == 60">已取消</span>
          </el-descriptions-item>
          <el-descriptions-item label="申请报价时间" v-if="$fieldShowFunc('ys_sqbjsj')">
            <div class="justify_6" slot="label">申请报价时间</div>
            {{ dataObj.apply_quotation_date || '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="最终报价时间" v-if="$fieldShowFunc('ys_zzbjsj')">
            <div class="justify_6" slot="label">最终报价时间</div>
            {{ dataObj.quotation_date || '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="报价单时效" v-if="$fieldShowFunc('ys_sjdsx')">
            <div class="justify_6" slot="label">报价单时效</div>
            {{ dataObj.quotation.quotation_validity ? dataObj.quotation.quotation_validity + '天' : '--' }}
          </el-descriptions-item>

          <el-descriptions-item label="预计开工日期" v-if="$fieldShowFunc('ys_yjkgrq')">
            <div class="justify_6" slot="label">预计开工日期</div>
                {{ dataObj.quotation.start_date ? dataObj.quotation.start_date : '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="预计完工日期" v-if="$fieldShowFunc('ys_yjwgrq')">
            <div class="justify_6" slot="label">预计完工日期</div>
                {{ dataObj.quotation.end_date ? dataObj.quotation.end_date : '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="工期天数" v-if="$fieldShowFunc('ys_gqts')">
            <div class="justify_6" slot="label">工期天数</div>
                {{ dataObj.quotation.duration_days ? dataObj.quotation.duration_days + '天' : '--' }}
          </el-descriptions-item>

          <el-descriptions-item label="项目面积" v-if="$fieldShowFunc('ys_xmmj')">
            <div class="justify_6" slot="label">项目面积</div>
            {{ dataObj.quotation.building_area ? dataObj.quotation.building_area + 'm²' : '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="报价金额" v-if="$fieldShowFunc('ys_bjje')">
            <div class="justify_6" slot="label">报价金额</div>
            <el-popover placement="bottom-end" trigger="manual" :value="zjxPrice" :width="width31" :offset="10"
              popper-class="price-popover" transition="el-zoom-in-top">
              <el-descriptions :column="1" direction="horizontal" border>
                <el-descriptions-item label="基础装修费" :labelStyle="{ background: '#fff', border: 'none' }"
                  :contentStyle="{ border: 'none' }" v-if="$fieldShowFunc('ys_jczxf')">
                  <div class="justify_6" slot="label">基础装修费</div>
                  {{ dataObj.quotation.basic_decoration_fee ? dataObj.quotation.basic_decoration_fee + '元' : '--' }}
                </el-descriptions-item>
                <el-descriptions-item label="主材采购费" :labelStyle="{ background: '#fff', border: 'none' }"
                  :contentStyle="{ border: 'none' }" v-if="$fieldShowFunc('ys_zccgf')">
                  <div class="justify_6" slot="label">主材采购费</div>
                  {{ dataObj.quotation.material_costs ? dataObj.quotation.material_costs + '元' : '--' }}
                </el-descriptions-item>
                <el-descriptions-item label="税金" :labelStyle="{ background: '#fff', border: 'none' }"
                  :contentStyle="{ border: 'none' }" v-if="$fieldShowFunc('ys_sj')">
                  <div class="justify_6" slot="label">税金</div>
                  {{ dataObj.quotation.quotation_taxes ? dataObj.quotation.quotation_taxes + '元' :
                    dataObj.quotation.quotation_taxes == 0 ? '0元' : '--' }}
                </el-descriptions-item>
              </el-descriptions>

              <div class="item-box" @click="openClick('zjxPrice')" slot="reference"
                v-if="$fieldShowFunc('ys_jczxf') || $fieldShowFunc('ys_zccgf') || $fieldShowFunc('ys_sj')">
                <span class="title">{{ dataObj.quotation.quotation_amount ? dataObj.quotation.quotation_amount + '元' :
                  '--' }}</span>
                <i :class="zjxPrice ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
              </div>
              <div v-else slot="reference">
                <span class="title">{{ dataObj.quotation.quotation_amount ? dataObj.quotation.quotation_amount + '元' :
                  '--' }}</span>
              </div>
            </el-popover>
          </el-descriptions-item>

          <el-descriptions-item label="成本金额" v-if="$fieldShowFunc('ys_cbje')">
            <div class="justify_6" slot="label">成本金额</div>
            <el-popover placement="bottom-end" trigger="manual" :value="cbPrice" :width="width31" :offset="10"
              popper-class="price-popover" transition="el-zoom-in-top">
              <el-descriptions :column="1" direction="horizontal" border>
                <el-descriptions-item label="现场采购成本" :labelStyle="{ background: '#fff', border: 'none' }"
                  :contentStyle="{ border: 'none' }" v-if="$fieldShowFunc('ys_xccgcb')">
                  <div class="justify_6" slot="label">现场采购成本</div>
                  {{ dataObj.quotation.procurement_cost ? dataObj.quotation.procurement_cost + '元' : '--' }}
                </el-descriptions-item>
                <el-descriptions-item label="公司集采成本" :labelStyle="{ background: '#fff', border: 'none' }"
                  :contentStyle="{ border: 'none' }" v-if="$fieldShowFunc('ys_gscjcb')">
                  <div class="justify_6" slot="label">公司集采成本</div>
                  {{ dataObj.quotation.centralized_procurement_cost ? dataObj.quotation.centralized_procurement_cost +
                    '元'
                    :
                    '--' }}
                </el-descriptions-item>
                <el-descriptions-item label="管理成本" :labelStyle="{ background: '#fff', border: 'none' }"
                  :contentStyle="{ border: 'none' }" v-if="$fieldShowFunc('ys_glcb')">
                  <div class="justify_6" slot="label">管理成本</div>
                  {{ dataObj.quotation.management_costs ? dataObj.quotation.management_costs + '元' : '--' }}
                </el-descriptions-item>
              </el-descriptions>

              <div class="item-box" @click="openClick('cbPrice')" slot="reference"
                v-if="$fieldShowFunc('ys_xccgcb') || $fieldShowFunc('ys_gscjcb') || $fieldShowFunc('ys_glcb')">
                <span class="title">{{ dataObj.quotation.cost_amount ? dataObj.quotation.cost_amount + '元' : '--'
                }}</span>
                <i :class="cbPrice ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
              </div>
              <div v-else slot="reference">
                <span class="title">{{ dataObj.quotation.cost_amount ? dataObj.quotation.cost_amount + '元' : '--'
                  }}</span>
              </div>
            </el-popover>
          </el-descriptions-item>
          <el-descriptions-item label="利润金额" v-if="$fieldShowFunc('ys_lrje')">
            <div class="justify_6" slot="label">利润金额</div>
            {{ dataObj.quotation.profit_amount ? dataObj.quotation.profit_amount + '元' : '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="成本利润率" v-if="$fieldShowFunc('ys_cblrl')">
            <div class="justify_6" slot="label">成本利润率</div>
            {{ dataObj.quotation.profit_ratio ? dataObj.quotation.profit_ratio + '%' : '--' }}
          </el-descriptions-item>
          <el-descriptions-item label="报价单" v-if="dataObj.quotation && $fieldShowFunc('ys_bjd')">
            <div class="justify_6" slot="label">报价单</div>
            <div class="file-box-img-box flex ac">
              <template v-for="(file, idx) in dataObj.quotation.quotation_file">
                <div class="file-box-img" :key="idx">
                  <el-tooltip class="item" effect="dark" :content="file.file_name" placement="top">
                    <img @click="$fileViewHandle(file)" class="img" :src="$fileImgFunc(file)" />
                  </el-tooltip>
                </div>
              </template>
            </div>
            <span v-if="!dataObj.quotation.quotation_file.length">--</span>
          </el-descriptions-item>
          <el-descriptions-item label="成本单" v-if="dataObj.quotation && $fieldShowFunc('ys_cbd')">
            <div class="justify_6" slot="label">工程量清单</div>
            <div class="file-box-img-box flex ac">
              <template v-for="(file, idx) in dataObj.quotation.cost_list_file">
                <div class="file-box-img" :key="idx">
                  <el-tooltip class="item" effect="dark" :content="file.file_name" placement="top">
                    <img @click="$fileViewHandle(file)" class="img" :src="$fileImgFunc(file)" />
                  </el-tooltip>
                </div>
              </template>
            </div>
            <span v-if="!dataObj.quotation.quotation_file.length">--</span>
          </el-descriptions-item>
          <el-descriptions-item label="利润单" v-if="dataObj.quotation && $fieldShowFunc('ys_lrd')">
            <div class="justify_6" slot="label">利润单</div>
            <div class="file-box-img-box flex ac">
              <template v-for="(file, idx) in dataObj.quotation.profit_statement_file">
                <div class="file-box-img" :key="idx">
                  <el-tooltip class="item" effect="dark" :content="file.file_name" placement="top">
                    <img @click="$fileViewHandle(file)" class="img" :src="$fileImgFunc(file)" />
                  </el-tooltip>
                </div>
              </template>
            </div>
            <span v-if="!dataObj.quotation.quotation_file.length">--</span>
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptions_opacity" contentClassName="descriptions_opacity"
            v-for="key in $fieldRowFunc(3, 0, 1)" :key="key"></el-descriptions-item>
        </el-descriptions>
      </div>
    </div>

    <!-- 审核区域 -->
    <div class="examine-box" v-if="isExamine">
      <div class="examine-title">审核区域</div>
      <el-form :model="shbjdRuleForm">
        <el-form-item label="" prop="reviewPassed">
          <el-radio-group v-model="shbjdRuleForm.reviewPassed">
            <el-radio :label="1">是</el-radio>
            <el-radio :label="2">否</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item prop="remark" label="">
          <el-input :rows="4" type="textarea" v-model="shbjdRuleForm.remark" placeholder="审批意见"></el-input>
        </el-form-item>
        <el-form-item>
          <div class="form-btn">
            <el-button type="primary" @click="shbjdSubmit" :loading="diaLoading">提交</el-button>
          </div>
        </el-form-item>
      </el-form>
    </div>

    <el-drawer @close="hisDrawer = false" title="历史记录" :visible.sync="hisDrawer" :with-header="false" size="600px">
      <div class="right-box">
        <div class="title-box flex ac fw" style="margin: 20px 0 0 10px">历史记录</div>
        <el-timeline class="timeline">
          <template v-if="!logList.length">
            <el-empty description="无历史数据"></el-empty>
          </template>
          <el-timeline-item v-for="(item, index) in logList" :key="index">
            <div class="setp-box">
              <div class="setp-top flex ac jb">
                <p class="time">{{ item.updated_at || '' }}</p>
                <div class="user-box flex ac">
                  <img class="avater" :src="item.handlers_image" />
                  {{ item.handlers_name + "-" + item.handlers_position }}
                </div>
              </div>
              <div class="setp-content">
                <div class="title">
                  {{ item.content }}
                </div>
                <!-- 审核日志 -->
                <template v-if="item.log_status == 230">
                  <div class="content-table">
                    <div class="flex jb fw">
                      <div class="table-item ">
                        <span class="table-item-title history_justify_6">审批意见</span>
                        <span class="table-item-content">{{
                          item.form_data.remark || "--"
                        }}</span>
                      </div>
                    </div>
                  </div>
                </template>
                <template v-if="item.log_status == 240">
                  <div class="content-table">
                    <div class="flex jb fw">
                      <div class="table-item ">
                        <span class="table-item-title history_justify_6">审批意见</span>
                        <span class="table-item-content">{{
                          item.form_data.remark || "--"
                        }}</span>
                      </div>
                    </div>
                  </div>
                </template>
                <!-- 造价内容 -->
                <template v-if="item.log_status == 220">
                  <div class="content-table">
                    <div class="flex jb fw">
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_yjkgrq')">
                        <span class="table-item-title history_justify_6">预计开工日期</span>
                        <span class="table-item-content">{{
                          item.form_data.start_date || "--"
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_yjwgrq')">
                        <span class="table-item-title history_justify_6">预计完工日期</span>
                        <span class="table-item-content">{{
                          item.form_data.end_date || "--"
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_gqts')">
                        <span class="table-item-title history_justify_6">工期天数</span>
                        <span class="table-item-content">{{
                          item.form_data.duration_days ? item.form_data.duration_days + '天' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_xmmj')">
                        <span class="table-item-title history_justify_6">建筑面积</span>
                        <span class="table-item-content">{{
                          item.form_data.building_area ? item.form_data.building_area + 'm²' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_bjje')">
                        <span class="table-item-title history_justify_6">报价金额</span>
                        <span class="table-item-content">{{
                          item.form_data.quotation_amount ? item.form_data.quotation_amount + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_jczxf')">
                        <span class="table-item-title history_justify_6">基础装修费</span>
                        <span class="table-item-content">{{
                          item.form_data.basic_decoration_fee ? item.form_data.basic_decoration_fee + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_zccgf')">
                        <span class="table-item-title history_justify_6">主材采购费用</span>
                        <span class="table-item-content">{{
                          item.form_data.material_costs ? item.form_data.material_costs + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_sj')">
                        <span class="table-item-title history_justify_6">报价税金</span>
                        <span class="table-item-content">{{
                          item.form_data.quotation_taxes ? item.form_data.quotation_taxes + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_cbje')">
                        <span class="table-item-title history_justify_6">成本金额</span>
                        <span class="table-item-content">{{
                          item.form_data.cost_amount ? item.form_data.cost_amount + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_xccgcb')">
                        <span class="table-item-title history_justify_6">现场采购成本</span>
                        <span class="table-item-content">{{
                          item.form_data.procurement_cost ? item.form_data.procurement_cost + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_gscjcb')">
                        <span class="table-item-title history_justify_6">公司集采成本</span>
                        <span class="table-item-content">{{
                          item.form_data.centralized_procurement_cost ? item.form_data.centralized_procurement_cost +
                            '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_glcb')">
                        <span class="table-item-title history_justify_6">管理成本</span>
                        <span class="table-item-content">{{
                          item.form_data.management_costs ? item.form_data.management_costs + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_lrje')">
                        <span class="table-item-title history_justify_6">利润金额</span>
                        <span class="table-item-content">{{
                          item.form_data.profit_amount ? item.form_data.profit_amount + '元' : '--'
                        }}</span>
                      </div>
                      <div class="table-item width-50" v-if="$fieldShowFunc('ys_cblrl')">
                        <span class="table-item-title history_justify_6">利润率</span>
                        <span class="table-item-content">{{
                          item.form_data.profit_ratio ? item.form_data.profit_ratio + '%' : '--'
                        }}</span>
                      </div>
                      <div class="table-item">
                        <span class="table-item-title history_justify_6">备注</span>
                        <span class="table-item-content">{{
                          item.form_data.remark || "--"
                        }}</span>
                      </div>
                      <div class="table-item fw width-50" v-if="$fieldShowFunc('ys_bjd')">
                        <span class="table-item-title history_justify_6">报价单</span>
                        <div class="img-list-box flex ac fw">
                          <template v-for="(file, index) in item.form_data.quotation_file">
                            <el-tooltip class="item" effect="dark" :content="file.file_name" placement="top"
                              :key="index">
                              <img @click="$fileViewHandle(file)" :key="index" class="img" :src="$fileImgFunc(file)" />
                            </el-tooltip>
                          </template>
                        </div>
                      </div>
                      <div class="table-item fw width-50" v-if="$fieldShowFunc('ys_lrd')">
                        <span class="table-item-title history_justify_6">利润单</span>
                        <div class="img-list-box flex ac fw">
                          <template v-for="(file, index) in item.form_data.profit_statement_file">
                            <el-tooltip class="item" effect="dark" :content="file.file_name" placement="top"
                              :key="index">
                              <img @click="$fileViewHandle(file)" :key="index" class="img" :src="$fileImgFunc(file)" />
                            </el-tooltip>
                          </template>
                        </div>
                      </div>
                      <div class="table-item fw width-50" v-if="$fieldShowFunc('ys_cbd')">
                        <span class="table-item-title history_justify_6">工程量清单</span>
                        <div class="img-list-box flex ac fw">
                          <template v-for="(file, index) in item.form_data.cost_list_file">
                            <el-tooltip class="item" effect="dark" :content="file.file_name" placement="top"
                              :key="index">
                              <img @click="$fileViewHandle(file)" :key="index" class="img" :src="$fileImgFunc(file)" />
                            </el-tooltip>
                          </template>
                        </div>
                      </div>
                    </div>
                  </div>
                </template>
              </div>
            </div>
          </el-timeline-item>
        </el-timeline>
      </div>
    </el-drawer>
  </div>
</template>
<script>
import preSettlementApi from '@/api/preSettlementApi';
import projectApi from "@/api/projectApi";
import { getUserInfo } from '@/utils/auth';

export default {
  name: 'budgetDetailPage',
  data() {
    return {
      // 审核
      userInfo: {},
      isExamine: false,
      shbjdRuleForm: {
        remark: "",
        quotation_id: "",
        reviewPassed: 1,
      },
      diaLoading: false,

      zjxPrice: false,
      cbPrice: false,
      logList: [],
      dataObj: "",
      hisDrawer: false,

      width31: 0,
    };
  },
  computed: {

  },
  mounted() {
    window.addEventListener('resize', () => {
      this.zjxPrice = false
      this.cbPrice = false
    });

    this.userInfo = getUserInfo();
    this.isExamine = this.$route.query.examine || false;
    this.getBudgetDetails();//预算详情
  },
  methods: {
    openClick(field) {
      this.width31 = (this.$refs['databoxleft'].clientWidth / 3) - 3
      this[field] = !this[field]
    },
    // 预算详情
    getBudgetDetails() {
      if (!this.$route.query.id) return;
      preSettlementApi.getBudgetDetails({
        project_id: this.$route.query.id
      }).then(res => {
        console.log(res, '预算详情')
        if (res.code == 200) {
          if (Array.isArray(res.data.quotation)) {
            res.data.quotation = '';
          }
          res.data.log_list.forEach(item => {
            item.form_data = JSON.parse(item.form_data);
          })
          this.dataObj = res.data;
          this.logList = res.data.log_list;
          console.log(this.logList, "日志")
        }
      })
    },
    // 审核
    shbjdSubmit() {
      let shbjdRuleForm = this.shbjdRuleForm;
      console.log(shbjdRuleForm, "审核报价单参数");
      if (shbjdRuleForm.reviewPassed == 2 && shbjdRuleForm.remark == "") {
        this.$message({
          type: "warning",
          message: "请填写审批意见"
        });
        return;
      }
      this.diaLoading = true;
      // 拒绝
      if (shbjdRuleForm.reviewPassed == 2) {
        projectApi
          .quotationReviewRejected({
            quotation_id: "",
            project_id: this.$route.query.id,
            remark: shbjdRuleForm.remark,
          })
          .then((res) => {
            console.log(res, "审核报价单");
            this.diaLoading = false;
            if (res.code == 200) {
              this.getBudgetDetails();//预算详情
              this.isExamine = false;
              this.$router.push({
                path: '/budgetDetailPage',
                query: {
                  id: this.$route.query.id,
                }
              })
            }
            this.$message({
              type: res.code == 200 ? "success" : "warning",
              message: res.code == 200 ? "处理成功" : res.message,
            });
          })
          .catch((err) => {
            this.diaLoading = false;
            this.$message({
              type: "warning",
              message: err.message,
            });
          });
        return;
      }
      // 通过
      let audit_type = 1;
      if (this.dataObj.quotation.engineering_manager_review != 2) {
        audit_type = 1;
      }
      if (this.dataObj.quotation.engineering_manager_review == 2 && this.dataObj.quotation.cost_supervisor_review != 2) {
        audit_type = 2;
      }
      projectApi
        .quotationReviewPassed({
          quotation_id: "",
          project_id: this.$route.query.id,
          remark: shbjdRuleForm.remark,
          audit_type // this.userInfo.position_id == 7 ? 1 : 2
        })
        .then((res) => {
          console.log(res, "审核报价单");
          this.diaLoading = false;
          if (res.code == 200) {
            this.getBudgetDetails();//预算详情
            this.isExamine = false;
            this.$router.push({
              path: '/budgetDetailPage',
              query: {
                id: this.$route.query.id,
              }
            })
          }
          this.$message({
            type: res.code == 200 ? "success" : "warning",
            message: res.code == 200 ? "处理成功" : res.message,
          });
        })
        .catch((err) => {
          this.diaLoading = false;
          this.$message({
            type: "warning",
            message: err.message,
          });
        });
    },
    // 去项目详情
    goToProjectFunc() {
      this.$store.commit('isEventTriggeredFunc', true);
      this.$router.push({
        path: '/projectDetailNew',
        query: {
          id: this.dataObj.id
        }
      })
    },
  },
};
</script>
<style lang="scss" scoped>
@import '@/styles/detail.scss';
@import "./index.scss";
</style>
<style lang="scss">
.labelClassName {
  width: 160px;
  background: #f5f8fe !important;
  text-align: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.contentClassName {
  font-weight: 400 !important;
  font-size: 17px !important;
  color: #1b2431 !important;
  padding-left: 20px !important;
}

.labelClassName2 {
  width: 160px;
  background: rgba(0, 0, 0, 0) !important;
  text-align: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  border: none !important;
  border-bottom: 1px solid #eff2f8 !important;
}

.contentClassName2 {
  font-weight: 400 !important;
  font-size: 17px !important;
  color: #1b2431 !important;
  padding-left: 20px !important;
  border: none !important;
  border-bottom: 1px solid #eff2f8 !important;
}
</style>